<?php
/**
 * Created by PhpStorm.
 * User: kobe.wang
 * Date: 2019/3/22
 * Time: 10:31
 */
namespace CurrencyConfig\Currency;

use  Illuminate\Support\ServiceProvider;
class CurrencyProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->loadViewsFrom(__DIR__ . '/resources/views', 'Currency');
        $this->loadRoutesFrom(__DIR__.'/routes.php');
//        // 发布配置文件
        $this->publishes([
            __DIR__.'/resources/views' => base_path('resources/views/currency'),
//            __DIR__.'/config/avatar.php' => config_path('avatar.php'),
            __DIR__.'/database/migrations' => database_path('migrations')
        ]);
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('currency', function ($app) {
            return new Currency();
        });
    }

    public function provides()
    {
        return ['avatar'];
    }
}